#ifndef CARWIDGET_H
#define CARWIDGET_H

#include <QWidget>
#include <QTimer>
#include "odolabel.h"
#include "assist.h"
#include "voltlabel.h"
#include "warnlabel.h"
#include "speedboard.h"

#ifdef Q_OS_LINUX
#define SCREEN_WIDTH  480
#define SCREEN_HEIGHT 272
#endif

class CarWidget : public QWidget
{
  Q_OBJECT

#ifdef Q_OS_WIN32
  const quint16 SCREEN_WIDTH = 480;
  const quint16 SCREEN_HEIGHT = 272;
#endif

public:
#ifdef Q_OS_WIN32
  explicit CarWidget(QWidget *parent = nullptr);
#elif defined(Q_OS_LINUX)
  explicit CarWidget(QWidget *parent = 0);
#endif
  ~CarWidget();

public slots:
  void testValue();

private:
  void uiInit();

  OdoLabel *odo;
  Assist *assistLabel;
  VoltLabel *voltLabe;
  WarnLabel *warnLabel;

  SpeedBoard *speedLabel;

  QTimer *timer;


};

#endif // CARWIDGET_H
